﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmployeeForm.aspx.cs" Inherits="FBKPI.Forms.EmployeeForm" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#divBrowseDepartment").hide();
            $("#divBrowseSection").hide();
            $("#divBrowseSubSection").hide();
            $("#divBrowseSuperior").hide();
            $("#divBrowseJobPosition").hide();
            $("#divBrowseSubBranch").hide();
            $("#divBrowsePrivilege").hide();

            $("#divBrowseDepartment").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseSection").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseSubSection").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseSuperior").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseJobPosition").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowseSubBranch").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });
            $("#divBrowsePrivilege").dialog({ autoOpen: false, width: 900, height: 500, modal: true, resizable: false });

            if ($("#txt_department").val() == '') {
                $("#btn_BrowseSection").attr("disabled", true);
            }
            if ($("#txt_section").val() == '') {
                $("#btn_BrowseSubSection").attr("disabled", true);
            }

            $('.date-picker').datepicker({ dateFormat: 'dd/mm/yy' });

            $("#btn_save").click(function () {
                var param = "?";
                var isActive = 'false';
                var isAdmin = 'false';
                var isLock = 'false';

                $('#form1 td input:checked').each(function () {
                    var $cb = $(this);
                    if ($cb.attr('id') == 'chk_active') {
                        isActive = 'true';
                    }
                    if ($cb.attr('id') == 'chk_admin') {
                        isAdmin = 'true';
                    }

                    if ($cb.attr('id') == 'chk_lock') {
                        isLock = 'true';
                    }
                });

                param = param + "action=save";
                param = param + "&ID=" + $("#hfId").val();
                param = param + "&FirstName=" + $("#txt_firstname").val();
                //param = param + "&LastName=" + $("#txt_lastname").val();
                param = param + "&DepartmentID=" + $("#txt_departmentid").val();
                param = param + "&SectionID=" + $("#txt_sectionid").val();
                param = param + "&SubSectionID=" + $("#txt_subsectionid").val();
                param = param + "&SuperiorID=" + $("#txt_superiorid").val();
                param = param + "&JobPositionID=" + $("#txt_jobpositionid").val();
                param = param + "&JobTitle=" + $("#txt_jobtitle").val();
                param = param + "&Email=" + $("#txt_email").val();
                param = param + "&SubBranchID=" + $("#txt_subbranchid").val();
                param = param + "&Phone=" + $("#txt_phone").val();
                param = param + "&Ext=" + $("#txt_ext").val();
                param = param + "&isAdmin=" + isAdmin;
                param = param + "&isActive=" + isActive;
                param = param + "&JoinDate=" + $("#txt_joindate").val();
                param = param + "&CurrUser=" + $("#txt_user").val();
                param = param + "&PrivilegeID=" + $("#txt_privilegeid").val();
                param = param + "&isLock=" + isLock;
                param = param + "&NIK=" + $("#txtNIK").val(); ;
                ProcessRequest("EmployeeHandler.ashx" + param, "#divdetail", "#EmployeeTable");
                return false;
            });

            $("#btn_reset").click(function () {
                //                if (confirm('Are you sure?')) {
                //                    var param = "?";
                //                    param = param + "action=reset";
                //                    param = param + "&ID=" + $("#txt_id").val();
                //                    param = param + "&CurrUser=" + $("#txt_user").val();
                //                    ProcessRequest("EmployeeHandler.ashx" + param, "#divdetail", "#EmployeeTable");
                //                    return false;
                //                }

                $.msgBox.confirm("Benar akan reset password ?", function () {
                    var param = "?";
                    param = param + "action=reset";
                    param = param + "&ID=" + $("#txt_id").val();
                    param = param + "&CurrUser=" + $("#txt_user").val();
                    ProcessRequest("EmployeeHandler.ashx" + param, "#divdetail", "#EmployeeTable");
                    return false;
                }, false);
                return false;
            });

            $("#btn_delete").click(function () {
                //                if (confirm('Are you sure to delete this record?')) {
                //                    var param = "?";
                //                    param = param + "action=delete";
                //                    param = param + "&ID=" + $("#txt_id").val();
                //                    param = param + "&CurrUser=" + $("#txt_user").val();
                //                    ProcessRequest("EmployeeHandler.ashx" + param, "#divdetail", "#EmployeeTable");
                //                    return false;
                //                }

                $.msgBox.confirm("Benar data akan dihapus ?", function () {
                    var param = "?";
                    param = param + "action=delete";
                    param = param + "&ID=" + $("#txt_id").val();
                    param = param + "&CurrUser=" + $("#txt_user").val();
                    ProcessRequest("EmployeeHandler.ashx" + param, "#divdetail", "#EmployeeTable");
                    return false;
                }, false);
                return false;
            });

            $("#btn_close").click(function () {
                parent.$("#divdetail").dialog("close");
                return false;
            });


            //browse department
            $("#btn_BrowseDepartment").click(function () {
                $("#divBrowseDepartment").dialog("option", "title", '<span class="header-text">Select Department</span>');
                $("#divBrowseDepartment").dialog("open");
                $('#department').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/DepartmentSerializer.ashx?CurrUser=" + $("#txt_user").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickDepartment('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#department tbody tr', function () {
                    $('#department tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickDepartment = function (DepartmentID, DepartmentDescription) {
                $("#txt_department").val(DepartmentDescription);
                $("#txt_departmentid").val(DepartmentID);

                $("#txt_section").val('');
                $("#txt_sectionid").val('');

                $("#txt_subsection").val('');
                $("#txt_subsectionid").val('');

                $("#divBrowseDepartment").dialog("close");
                $("#btn_BrowseSection").attr("disabled", false);
            }
            //end browse department


            //browse section
            $("#btn_BrowseSection").click(function () {
                $("#divBrowseSection").dialog("option", "title", '<span class="header-text">Select Section</span>');
                $("#divBrowseSection").dialog("open");
                $('#section').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/SectionByDepartmentSerializer.ashx?&DepartmentID=" + $("#txt_departmentid").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickSection('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#section tbody tr', function () {
                    $('#section tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickSection = function (SectionID, SectionDescription) {
                $("#txt_section").val(SectionDescription);
                $("#txt_sectionid").val(SectionID);

                $("#txt_subsection").val('');
                $("#txt_subsectionid").val('');

                $("#divBrowseSection").dialog("close");
                $("#btn_BrowseSubSection").attr("disabled", false);
            }
            //end browse department


            //browse subsection
            $("#btn_BrowseSubSection").click(function () {
                $("#divBrowseSubSection").dialog("option", "title", '<span class="header-text">Select SubSection</span>');
                $("#divBrowseSubSection").dialog("open");
                $('#subsection').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/SubSectionBySectionSerializer.ashx?SectionID=" + $("#txt_sectionid").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickSubSection('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#subsection tbody tr', function () {
                    $('#subsection tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickSubSection = function (SubSectionID, SubSectionDescription) {
                $("#txt_subsection").val(SubSectionDescription);
                $("#txt_subsectionid").val(SubSectionID);
                $("#divBrowseSubSection").dialog("close");
            }
            //end browse subsection


            //browse superior
            $("#btn_BrowseSuperior").click(function () {
                $("#divBrowseSuperior").dialog("option", "title", '<span class="header-text">Select Superior</span>');
                $("#divBrowseSuperior").dialog("open");
                $('#superior').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/EmployeeSerializer.ashx?CurrUser=" + $("#txt_user").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "FirstName" },
                        { "mData": "LastName" },
                        { "mData": "Department" },
                        { "mData": "Section" },
                        { "mData": "SubSection" },
                        { "mData": "JobPosition" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickSuperior('" + oObj.aData["ID"] + "','" + oObj.aData["FirstName"] + " " + oObj.aData["LastName"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [7]
                        },
                        { "sClass": "center", "aTargets": [0, 7] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#superior tbody tr', function () {
                    $('#superior tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickSuperior = function (SuperiorID, SuperiorName) {
                $("#txt_superior").val(SuperiorName);
                $("#txt_superiorid").val(SuperiorID);
                $("#divBrowseSuperior").dialog("close");
            }
            //end browse superior

            //browse jobposition
            $("#btn_BrowseJobPosition").click(function () {
                $("#divBrowseJobPosition").dialog("option", "title", '<span class="header-text">Select Job Position</span>');
                $("#divBrowseJobPosition").dialog("open");
                $('#jobposition').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/JobPositionSerializer.ashx?CurrUser=" + $("#txt_user").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Position" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickJobPosition('" + oObj.aData["ID"] + "','" + oObj.aData["Position"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [3]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#jobposition tbody tr', function () {
                    $('#jobposition tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickJobPosition = function (JobPositionID, JobPositionDescription) {
                $("#txt_jobposition").val(JobPositionDescription);
                $("#txt_jobpositionid").val(JobPositionID);
                $("#divBrowseJobPosition").dialog("close");
            }
            //end browse jobposition

            //browse subbranch
            $("#btn_BrowseSubBranch").click(function () {
                $("#divBrowseSubBranch").dialog("option", "title", '<span class="header-text">Select Sub Branch</span>');
                $("#divBrowseSubBranch").dialog("open");
                $('#subbranch').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/SubBranchSerializer.ashx?CurrUser=" + $("#txt_user").val(),
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Code" },
                        { "mData": "OrgID" },
                        { "mData": "Description" },
                        { "mData": "Branch" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickSubBranch('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [6]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [5]
                        },
                        { "sClass": "center", "aTargets": [0, 1, 2, 4, 5, 6] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#subbranch tbody tr', function () {
                    $('#subbranch tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickSubBranch = function (SubBranchID, SubBranchDescription) {
                $("#txt_subbranch").val(SubBranchDescription);
                $("#txt_subbranchid").val(SubBranchID);
                $("#divBrowseSubBranch").dialog("close");
            }
            //end browse location

            //browse privilege
            $("#btn_BrowsePrivilege").click(function () {
                $("#divBrowsePrivilege").dialog("option", "title", '<span class="header-text">Select Privilege</span>');
                $("#divBrowsePrivilege").dialog("open");
                $('#privilege').dataTable({
                    "oLanguage": {
                        "sZeroRecords": "No records to display",
                        "sSearch": "Search"
                    },
                    "bSort": false,
                    "bPaginate": true,
                    "bAutoWidth": true,
                    "bProcessing": true,
                    "bServerSide": true,
                    "bDestroy": true,
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bDeferRender": true,
                    "fnServerData": function (sSource, aoData, fnCallback) {
                        $.ajax({
                            "dataType": 'json',
                            "type": "GET",
                            "url": "../Serializer/PrivilegeSerializer.ashx",
                            "data": aoData,
                            "success": fnCallback
                        });
                    },
                    "aoColumns": [
                        { "mData": "No" },
                        { "mData": "Description" },
                        { "mData": "AbleToAssign" },
                        { "mData": "AbleToBreakDown" },
                        { "mData": "isActive" },
                        { "mData": "ID" }
                    ],
                    "aoColumnDefs":
                    [
                        { "fnRender":
                            function (oObj) {
                                return "<a href=\"#\" onclick=\"PickPrivilege('" + oObj.aData["ID"] + "','" + oObj.aData["Description"] + "')\"><img src='../images/ok.png' /></a>";
                            },
                            "aTargets": [5]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["AbleToAssign"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [2]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["AbleToBreakDown"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [3]
                        },
                        { "fnRender":
                            function (oObj) {
                                if (oObj.aData["isActive"] == 'True') {
                                    return "<img src='../images/check.png' />"
                                }
                                else {
                                    return "<img src='../images/cross.png' />"
                                }
                            },
                            "aTargets": [4]
                        },
                        { "sClass": "center", "aTargets": [0, 2, 3] }
                    ]
                });

                //mark selected row
                $('body').on("click", '#privilege tbody tr', function () {
                    $('#privilege tbody tr').removeClass("row_selected");
                    $(this).addClass("row_selected");
                });
                $(".dataTables_filter input").focus();
                return false;
            });

            PickPrivilege = function (PrivilegeID, PrivilegeDescription) {
                $("#txt_privilege").val(PrivilegeDescription);
                $("#txt_privilegeid").val(PrivilegeID);
                $("#divBrowsePrivilege").dialog("close");
            }
            //end browse privilege

            $('#lnkremovesupervisor').click(function () {
                $("#txt_superior").val('');
                $("#txt_superiorid").val('0');
            }); 
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="employeeformarea" class="ui-widget-content padding5px ui-corner-all">
        <table class="dialogTable" width="100%">
            <tr>
                <td width="50%">
                    <table>
                        <tr runat="server" visible="false">
                            <td width="140px">
                                ID
                            </td>
                            <td class="Separator">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_id" runat="server" ReadOnly="true"></asp:TextBox>
                            </td>
                        </tr>
                         <tr>
                            <td>
                                NIK
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtNIK" runat="server" class="longText mandatory"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_firstname" runat="server" class="longText mandatory"></asp:TextBox>
                            </td>
                        </tr>
                        <tr runat="server" visible="false">
                            <td>
                                Last Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_lastname" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Department
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_department" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowseDepartment" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_departmentid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Section
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_section" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowseSection" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_sectionid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Sub Section
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_subsection" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowseSubSection" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_subsectionid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Superior
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_superior" runat="server" ReadOnly="true" class="longText"></asp:TextBox>
                                <button id="btn_BrowseSuperior" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_superiorid" runat="server" />&nbsp;<a id="lnkremovesupervisor" href="#">remove</a>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Join Date
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_joindate" runat="server" ReadOnly="true" class="date-picker"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Privilege
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_privilege" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowsePrivilege" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_privilegeid" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="50%">
                    <table>
                        <tr>
                            <td width="140px">
                                Job Position
                            </td>
                            <td class="Separator">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_jobposition" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowseJobPosition" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_jobpositionid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Job Title
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_jobtitle" runat="server" class="longText"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Sub Branch
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_subbranch" runat="server" ReadOnly="true" class="longText mandatory"></asp:TextBox>
                                <button id="btn_BrowseSubBranch" class="ui-button ui-state-default">
                                    <span class="ui-button ui-icon ui-icon-newwin"></span>
                                </button>
                                <input type="hidden" id="txt_subbranchid" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_email" runat="server" class="longText mandatory"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Phone
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_phone" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Ext
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txt_ext" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                is Admin
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:CheckBox ID="chk_admin" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                is Active
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:CheckBox ID="chk_active" Checked="true" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                is Lock
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:CheckBox ID="chk_lock" runat="server" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <br />
    <%-- <div id="AuditInformation" class="ui-widget-content padding5px ui-corner-all">
        <b style="margin-left: 5px">Audit Information</b>
        <table class="dialogTable">
            <tr>
                <td width="140px">
                    Last Modified Date
                </td>
                <td class="Separator">
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_lastmodifieddate" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Last Modified By
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_lastmodifiedby" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Create Date
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_createdate" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Create By
                </td>
                <td>
                    :
                </td>
                <td>
                    <asp:TextBox ID="txt_createby" runat="server" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>--%>
    <div id="divBrowseDepartment" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="department">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Description
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowseSection" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="section">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Description
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowseSubSection" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="subsection">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Description
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowseSuperior" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="superior">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        First Name
                    </th>
                    <th>
                        Last Name
                    </th>
                    <th>
                        Department
                    </th>
                    <th>
                        Section
                    </th>
                    <th>
                        Sub Section
                    </th>
                    <th>
                        Job Position
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowseJobPosition" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="jobposition">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Job Position
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowseSubBranch" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="subbranch">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Code
                    </th>
                    <th>
                        ORG ID
                    </th>
                    <th>
                        Description
                    </th>
                    <th>
                        Branch
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <div id="divBrowsePrivilege" class="ui-widget-content padding5px ui-corner-all">
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="privilege">
            <thead>
                <tr>
                    <th>
                        No
                    </th>
                    <th>
                        Description
                    </th>
                    <th>
                        Able To Assign
                    </th>
                    <th>
                        Able To Break Down
                    </th>
                    <th>
                        is Active
                    </th>
                    <th>
                    </th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <br />
    <button id="btn_save" class="button save">
        Save
    </button>
    <button id="btn_reset" runat="server" class="button edit">
        Reset Password
    </button>
    <button id="btn_close" class="button close">
        Close
    </button>
    <%--  <button id="btn_delete" class="ui-button ui-corner-all ui-button ui-state-default ui-button-text-icon-primary"
        runat="server">
        <span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span>
        <label class="ui-button-text">
            Delete</label>
    </button>--%>
    <asp:HiddenField ID="hfId" runat="server" Value="0" />
    </form>
</body>
</html>
